// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
// import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-default/index.css'
import ElementUI from 'element-ui'
import Axios from 'axios'
import 'font-awesome/css/font-awesome.min.css' // 一套绝佳的图标字体库和CSS框架 http://fontawesome.dashgame.com/
import moment from 'moment' //时间格式化组件库moment.js

Vue.use(ElementUI)
Vue.prototype.$http = Axios
Vue.config.productionTip = false

// 在需要格式化时间的地方使用插值表达式
// <span>{{ props.row.endTime | dateformat('YYYY-MM-DD HH:mm:ss') }}</span>
Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
    return moment(dataStr).format(pattern)
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
